home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Resources / Online / Term / Extras / Source / gtlayout-source.lha / LTP_RenderArrow.c < prev    next >
C/C++ Source or Header  |  1996-03-18  |  654b  |  38 lines

  1. /*
  2. **    GadTools layout toolkit
  3. **
  4. **    Copyright © 1993-1996 by Olaf `Olsen' Barthel
  5. **        Freely distributable.
  6. **
  7. **    :ts=4
  8. */
  9.  
  10. #ifndef _GTLAYOUT_GLOBAL_H
  11. #include "gtlayout_global.h"
  12. #endif
  13.  
  14. #ifdef DO_TAPEDECK_KIND
  15. VOID
  16. LTP_RenderArrow(struct RastPort *RPort,BOOL LeftDirection,LONG Left,LONG Top,LONG Width,LONG Height)
  17. {
  18.     LONG i,Len,Start,Pos;
  19.  
  20.     for(i = 0 ; i < Width ; i++)
  21.     {
  22.         Len = ((Height * (i + 1)) / Width) & ~1;
  23.  
  24.         if(Len < Height)
  25.             Len++;
  26.  
  27.         Start = Top + (Height - Len) / 2;
  28.  
  29.         if(LeftDirection)
  30.             Pos = Left + i;
  31.         else
  32.             Pos = Left + Width - 1 - i;
  33.  
  34.         LTP_DrawLine(RPort,Pos,Start,Pos,Start + Len - 1);
  35.     }
  36. }
  37. #endif    /* DO_TAPEDECK_KIND */
  38.